package cn.com.simple.learning.designpattern.behavior.iterator;

/**
 * @author Jianxing.Jia
 * @date 2022/2/9
 * @description 描述信息
 */
public class IteratorTest {
    public static void main(String[] args) {
        NameRepository nameRepository = new NameRepository();

        for (Iterator iterator = nameRepository.getIterator(); iterator.hasNext(); ) {
            Object next = iterator.next();
            System.out.println(next);
        }

    }
}
